#include <stdio.h>

static union { char c[4]; unsigned long l;} endian_test = {{'l', '?', '?', 'b'}};

#define ENDIANNESS ((char)endian_test.l)

int main()
{
    char ch = ENDIANNESS;
    if (ch = 'l') {
        printf("little\n");
    } else if (ch == 'b') {
        printf("big\n");
    } else {
        printf("unkown\n");
    }

    return 0;
}

